var express = require('express');
var router = express.Router();
const adminCtrl = require('../controller/admin')
const adminValidator = require('../validator/admin')

router.post('/admin/login', adminValidator.login, adminCtrl.login);
router.post('/admin/register', adminValidator.register, adminCtrl.register);
router.get('/admin/userinfo', adminCtrl.userinfo);
router.get('/admin/userList', adminCtrl.userList);
router.post('/admin/changeRole', adminValidator.changeRole, adminCtrl.changeRole);


module.exports = router;
